package com.xuecheng.search.search;


import com.xuecheng.framework.domain.search.CourseBaseSearch;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.lang.NonNullApi;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;
import java.util.Optional;

@Repository
public interface CourseBaseSearchRepository extends ElasticsearchRepository<CourseBaseSearch,String> {

    // 根据name模糊查询
    List<CourseBaseSearch> findByNameLike(String name);
    // 查询在某一段时间之内
    List<CourseBaseSearch> findByTimeAfterAndTimeBefore(String after,String before);
    // 根据name 精准匹配  不分词查询
    List<CourseBaseSearch> findByNameIs(String name);

    // 根据多个字段查询
    List<CourseBaseSearch> findByDescriptionIn(String... strings);

    // 排序
    List<CourseBaseSearch> findByNameLikeOrderByPrice(String strings);


}
